package com.jkt.rms.commons.utils;

import org.apache.log4j.Logger;

public class ExceptionFactory {

	private ExceptionFactory () {
        // disabled
    }
	
	 /**
     * Creates a new exception.
     *
     * @param log
     *            the logger
     * @param cause
     *            the underlying cause
     * @param args
     */
    public static RMSException createRMSException( Logger log, Throwable cause,
            Object... args ) {
        final RMSException rmse = new RMSException( cause, args );
        log.error( rmse.getLocalizedMessage(), rmse );
        return rmse;
    }
	
}
